package com.itheima.tlias.mapper;

import com.itheima.tlias.domain.Emp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

/**
 * @author ghy
 * @version 1.0.1
 * @date 2024-01-28 11:01:42
 */
@Mapper
public interface EmpMapper {

    /**
     * 根据条件查询【目前没有条件】
     * @return
     */
    List<Emp> findCondition(@Param("name") String name,
                            @Param("gender") Integer gender,
                            @Param("begin") LocalDate begin,
                            @Param("end") LocalDate end);

    Emp findById(Integer id);

    Integer findByNameNotId(@Param("username") String username, @Param("id") Integer id);

    void update(Emp emp);

    void deleteByIds(@Param("ids") List<Integer> ids);

    Emp findByUsername(String username);
}
